{include file="public/header" /}
{load href="__PLUGINS__bootstrap/bootstrap-table.min.css"}
{load href="__PLUGINS__bootstrap/bootstrap-table.min.js"}
<style>
    #des, #des input {
        width: 40px;
        text-align: center;
    }

    #id {
        width: 78px;
    }

    .bs-checkbox {
        width: 36px;
        height: 40px
    }

    .fixed-table-toolbar .columns, .fixed-table-toolbar .search {
        margin-left: 0;
        margin-top: 0
    }

    #title span {
        float: right;
    }

    .asdlkjasd {
        background: #1ab394;
        color: #fff
    }
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content {:config('adminClass.main')}">
    <div class="ibox float-e-margins">
        <div class="">
            <a onclick="add('{:url('addnoblestyle', ['noble_id' => $noble_id, 'url' => -1])}')" href="javascript:void(0);" class="btn btn-primary ">添加套餐</a>
        </div>

        <script type="text/javascript">

            function add(url)
            {
                layer.open({
                    type: 2,
                    title: '提示',
                    shadeClose: false,
                    shade: 0.2,
                    area: ['90%', '90%'],
                    skin:'shangchuantup',
                    shift:-1,
                    content: url,
                    scrollbar: false,
                    moveType: 1,
                    moveOut: true
                });
            }

        </script>
        <div class="ibox-title">
            <h5>
                VIP套餐</h5>
        </div>
        <div class="ibox-content">
            {include file="public/topsection"}
            <div class="row row-lg">
                <div class="col-sm-12">
                    <div class="example">
                        <form class="form-horizontal" method="post">
                            <table data-toggle="table">
                                <thead>
                                <tr>
                                    <th data-align="center">排序</th>
                                    <th data-align="center">ID</th>
                                    <th data-align="center">名称</th>
                                    <th data-align="center">价格</th>
                                    <th data-align="center">时长</th>
                                    <th data-align="center">赠送金币</th>
                                    <th data-align="center">管理</th>
                                </tr>
                                </thead>
                                <tbody id="form">
                                {volist name="data" id="v"}
                                <tr id="id{$v.id}" class="class">
                                    <td>{$v.sort}</td>
                                    <td>{$v.id}</td>
                                    <td>{$v.name}</td>
                                    <td>{$v.price}</td>
                                    <td>{$v.keep} {$v.times}</td>
                                    <td>{if condition='$v.reward'}{$v.reward}{/if}</td>
                                    <td>
                                        <div class="btn-group">
                                            <div data-toggle="dropdown" class="btn btn-primary btn-xs dropdown-toggle">操作 <span class="caret"></span>
                                            </div>
                                            <ul class="dropdown-menu">
                                                <li><a onClick="add('{:url('addnoblestyle',['id'=>$v['id'], 'url' => -1])}')">修改</a></li>
                                                <li class="divider"></li>
                                                <li><a onClick="del({$v.id})">删除</a></li>
                                            </ul>
                                        </div>
                                    </td>
                                </tr>
                                {/volist}
                                </tbody>
                            </table>
                        </form>
                    </div>
                </div>
            </div>
            <hr>
            <div class="row row-lg">
                <div class="col-sm-12 pages">{$page}</div>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}

<script type="text/javascript">

    $(document).ready(function(){
        $('#delidAll').click(function(){
            $('input[type=checkbox]').each(function(){
                var self=$(this);
                if(!self.prop('checked')){
                    self.prop('checked',true);
                }else{
                    self.prop('checked',false);
                }
            });
        })
    });

    function del(id){
        swal_del(id,"{:url('delNobleStyle')}")
    }

</script>
